package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-07-25
 * Time: 13:48
 */

class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("我是Thread");
    }
}

public class TestDemo {

    public static void main(String[] args) {
        Runnable runnable = new MyRunnable();

        Thread t = new Thread(runnable,"Thread线程:");
        t.start();

        System.out.println("我是main");
        System.out.println(t.getName());
        System.out.println(t.getName());
        System.out.println(t.getName());

    }


}
